class GoodsCommentEntity {
  GoodsCommentData data;
  int code;
  String msg;

  GoodsCommentEntity({this.data, this.code, this.msg});

  GoodsCommentEntity.fromJson(Map<String, dynamic> json) {
    data =
        json['data'] != null ? new GoodsCommentData.fromJson(json['data']) : null;
    code = json['code'];
    msg = json['msg'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.data != null) {
      data['data']['list'] = this.data.toJson();
    }
    data['code'] = this.code;
    data['msg'] = this.msg;
    return data;
  }
}

class GoodsCommentData {
  List<GoodsCommentDataData> datas;

  GoodsCommentData();

  GoodsCommentData.fromJson(Map<String, dynamic> json) {
    if (json['list'] != null) {
      datas = new List<GoodsCommentDataData>();
      (json['list'] as List).forEach((v) {
        datas.add(new GoodsCommentDataData.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.datas != null) {
      data['list'] = this.datas.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class GoodsCommentDataData {
  String score;
  String goods_comment_id;
  String user_id;
  String user_avatar;
  String user_nickname;
  String grade;
  String video;
  String content;
  String brand_id;
  String img;
  String comment_time;
  String have_img;
  String sku;
  String give_point;
  Object sales_volume;
  String comment_num;
  String start_time;
  String limit_num;
  String end_time;
  String all_num;
  String sales_num;
  List<String> imgList;
  GoodsCommentDataData(
      {this.score,
      this.goods_comment_id,
      this.user_id,
      this.start_time,
      this.limit_num,
      this.end_time,
      this.user_avatar,
      this.user_nickname,
      this.sales_num,
      this.all_num,
      this.grade,
      this.video,
      this.content,
      this.comment_num,
      this.brand_id,
      this.img,
      this.comment_time,
      this.have_img,
      this.sku,
      this.give_point,
      this.sales_volume});

  GoodsCommentDataData.fromJson(Map<String, dynamic> json) {
    score = json['score'].toString();
    user_avatar = json['user_avatar'].toString().replaceAll("\\", "/");
    user_id = json['user_id'].toString();
    user_nickname = json['user_nickname'];
    all_num=json['all_num'].toString();
    sales_num=json['sales_num'].toString();
    limit_num=json['limit_num'].toString();
    start_time=json['start_time'];
    end_time=json['end_time'];
    grade = json['grade'];
    sku = json['sku'].toString();
    sales_volume = json['sales_volume'].toString();
    have_img = json['have_img'].toString();
    comment_num = json['comment_num'].toString();
    comment_time = json['comment_time'].toString();
    give_point = json['give_point'].toString();
    img = json['img'].toString();
    content = json['content'];
    imgList=new List();
     if (json['img_arr'] != null) {
      (json['img_arr'] as List).forEach((v) {
        imgList.add(v);
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['score'] = this.score;
    data['user_avatar'] = this.user_avatar;
    data['user_nickname'] = this.user_nickname.replaceAll("\\", "");
    data['user_id'] = this.user_id;
    data['sku'] = this.sku;
    data['comment_num'] = this.comment_num;
    data['grade'] = this.grade;
    data['img'] = this.img;
    data['content'] = this.content;
    data['give_point'] = this.give_point;
    data['comment_time'] = this.comment_time;

    return data;
  }
}
